package design.onekey.model.dto;

import design.onekey.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @ProjectName: plat-aggregation
 * @Package: com.baiyyy.yfz.entity
 * @ClassName: BaseOrgTreeDto
 * @Author: Administrator
 * @Description: 基础组织机构树结构
 * @Date: 2020-6-8 13:36
 * @Version: 1.0
 */
@Data
@AllArgsConstructor
@Builder
public class BaseOrgTreeDto extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    private Long parentId;
    private String name;
    private boolean open;
    private List<BaseOrgTreeDto> childList = new ArrayList<>();

    public BaseOrgTreeDto(Long id, Long parentId, String name) {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
    }
}
